package cn.qingyun.gis.modules.caronline.entity.dto;


import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * <p>
 * 网约车勘误导出对象
 * </p>
 *
 * @author miyunguo
 * @since 2023-11-1
 */

@Data
public class CarExportTotalDto {

    /**
     * id
     */
    @ApiModelProperty(value = "id")
    private String id;

    /**
     * 行政省份
     */
    @ApiModelProperty(value = "行政省份")
    @ExcelProperty(value = "省份")
    private String province;

    /**
     * 行政地市
     */
    @ApiModelProperty(value = "行政地市")
    @ExcelProperty(value = "行政地市")
    private String city;

    /**
     * 行政区县
     */
    @ApiModelProperty(value = "行政区县")
    @ExcelProperty(value = "行政区县")
    private String districts;

    /**
     * 网格名称
     */
    @ApiModelProperty(value = "网格名称")
    @ExcelProperty(value = "归属网格")
    private String gridName;

    /**
     * 网格编码
     */
    @ApiModelProperty(value = "网格编码")
    @ExcelProperty(value = "网格编码")
    private String gridId;

    /**
     * 微网格id
     */
    @ApiModelProperty(value = "微网格编码")
    @ExcelProperty(value = "微网格编码")
    private String microGridId;

    /**
     * 微网格名称
     */
    @ApiModelProperty(value = "微网格名称")
    @ExcelProperty(value = "微网格名称")
    private String microGridName;

    @ApiModelProperty(value = "是否归属本网格(0:不归属,1:归属)")
    @ExcelProperty("是否归属本网格")
    private String gridBelongStatus;

    @ApiModelProperty(value = "应属区县")
    @ExcelProperty("应属区县")
    private String belongCounty;

    @ApiModelProperty(value = "应属网格")
    @ExcelProperty("应属网格")
    private String belongGrid;
    /**
     * 分类二
     */
    @ApiModelProperty(value = "分类二")
    @ExcelProperty(value = "网约车类型")
    private String typeTwo;
    /**
     * 商铺编码（poi编码）
     */
    @ApiModelProperty(value = "商铺编码（poi编码）")
    @ExcelProperty(value = "匹配商铺编码")
    private String poiId;

    @ApiModelProperty(value = "细分市场类型")
    @ExcelProperty(value = "细分市场类型")
    private String type;

    /**
     * 商铺名称（poi名称）
     */
    @ApiModelProperty(value = "商铺名称（poi名称）")
    @ExcelProperty(value = "匹配商铺名称")
    private String poiName;

    /**
     * 商铺地址（poi地址）
     */
    @ApiModelProperty(value = "商铺地址（poi地址）")
    @ExcelProperty(value = "匹配商铺地址")
    private String poiAddress;

    /**
     * 街道名称
     */
    @ApiModelProperty(value = "街道名称")
    @ExcelProperty(value = "匹配街道名称")
    private String streetName;

    /**
     * 站点是否存在(0:未存在,1:已存在)
     */
    @ExcelProperty(value = "站点是否存在")
    @ApiModelProperty(value = "站点是否存在(0:未存在,1:已存在)")
    private String stationExistStatue;

    @ExcelProperty(value = "备注说明")
    @ApiModelProperty(value = "备注说明")
    private String stationDescr;

    /**
     * 经度
     */
    @ApiModelProperty(value = "经度")
    @ExcelProperty(value = "经度")
    private BigDecimal lon;

    /**
     * 纬度
     */
    @ApiModelProperty(value = "纬度")
    @ExcelProperty(value = "纬度")
    private BigDecimal lat;

    @ExcelProperty("校对状态")
    private String kwStatus;

    @ExcelProperty(value = "校对经度")
    private BigDecimal kwLon;

    @ExcelProperty(value = "校对纬度")
    private BigDecimal kwLat;

    @ExcelProperty("校对后名称")
    private String kwStationName;

    @ExcelProperty("校对后地址")
    private String kwAddress;

    @ExcelProperty("校对后地址描述")
    private String kwAddressDescribe;

    @ExcelProperty(value = "现有外卖点人数")
    @ApiModelProperty(value = "站点人数")
    private Integer stationNum;

    @ExcelProperty(value = "我网客户占比")
    @ApiModelProperty(value = "我网客户占比")
    private String clientProportion;

    @ExcelProperty(value = "站点联系人")
    @ApiModelProperty(value = "站点联系人")
    private String stationLinkman;

    @ExcelProperty(value = "联系电话")
    @ApiModelProperty(value = "联系电话")
    private String stationPhone;

    @ExcelProperty(value = "宽带资源是否覆盖")
    @ApiModelProperty(value = "宽带网络资源是否覆盖(0:未覆盖,1:已覆盖)")
    private String resourceCoverStatue;

    @ExcelProperty(value = "站长是否协助宣传")
    @ApiModelProperty(value = "站长是否协助宣传(0:否,1:是)")
    private String emotionInPlaceStatue;

    @ExcelProperty(value = "是否报销话费")
    @ApiModelProperty(value = "是否报销话费(0:未报销,1:已报销)")
    private String billStatus;

    @ExcelProperty(value = "是否已统一办理号卡")
    @ApiModelProperty(value = "是否已经办理移动卡号(0:未办理,1:已办理)")
    private String applyCardStatus;

    @ExcelProperty(value = "未拓展原因(用|隔开)")
    @ApiModelProperty(value = "未拓展原因(用|隔开)")
    private String unextendedReason;

    @ExcelProperty(value = "今年已办卡数")
    @ApiModelProperty(value = "已办卡数量")
    private String cardsNum;

    @ExcelProperty(value = "当月办卡数")
    @ApiModelProperty(value = "月办卡(张)")
    private Integer monthlyCard;

    @ExcelProperty(value = "是否办理骑士卡")
    @ApiModelProperty(value = "办理骑士卡（0：否，1：是）")
    private String tsitska;

    @ExcelProperty(value = "套餐(元)")
    @ApiModelProperty(value = "套餐(元)")
    private String comboMoney;

    @ExcelProperty(value = "通话(分钟)")
    @ApiModelProperty(value = "通话(分钟)")
    private Integer communicate;

    @ExcelProperty(value = "通用流量(G)")
    @ApiModelProperty(value = "通用流量(G)")
    private String generalFlux;

    @ExcelProperty(value = "具体办理号码(用|隔开)")
    private String specificNumber;

    @ExcelProperty(value = "最近更新时间")
    private String updateTime;

    // 20231011添加导入字段
    @ExcelProperty(value = "业务地市")
    private String regionCity;

    @ExcelProperty(value = "业务地市编码")
    private String regionCityCode;

    @ApiModelProperty(value = "业务区县")
    @ExcelProperty(value = "业务区县")
    private String regionDistricts;

    @ApiModelProperty(value = "业务区县编码")
    @ExcelProperty(value = "业务区县编码")
    private String regionDistrictsCode;

    public String getGridBelongStatus() {
        if (gridBelongStatus != null) {
            return "0".equals(gridBelongStatus) ? "否" : "是";
        }
        return gridBelongStatus;
    }

    public void setGridBelongStatus(String gridBelongStatus) {
        this.gridBelongStatus = gridBelongStatus;
    }

    public String getStationExistStatue() {
        if (stationExistStatue != null) {
            return "0".equals(stationExistStatue) ? "否" : "是";
        }
        return stationExistStatue;
    }

    public void setStationExistStatue(String stationExistStatue) {
        this.stationExistStatue = stationExistStatue;
    }

    public String getKwStatus() {
        if (kwStatus != null) {
            return "0".equals(kwStatus) ? "否" : "是";
        }
        return kwStatus;
    }

    public void setKwStatus(String kwStatus) {
        this.kwStatus = kwStatus;
    }

    public String getResourceCoverStatue() {
        if (resourceCoverStatue != null) {
            return "0".equals(resourceCoverStatue) ? "否" : "是";
        }
        return resourceCoverStatue;
    }

    public void setResourceCoverStatue(String resourceCoverStatue) {
        this.resourceCoverStatue = resourceCoverStatue;
    }

    public String getEmotionInPlaceStatue() {
        if (emotionInPlaceStatue != null) {
            return "0".equals(emotionInPlaceStatue) ? "否" : "是";
        }
        return emotionInPlaceStatue;
    }

    public void setEmotionInPlaceStatue(String emotionInPlaceStatue) {
        this.emotionInPlaceStatue = emotionInPlaceStatue;
    }

    public String getBillStatus() {
        if (billStatus != null) {
            return "0".equals(billStatus) ? "否" : "是";
        }
        return billStatus;

    }

    public String getApplyCardStatus() {
        if (applyCardStatus != null) {
            return "0".equals(applyCardStatus) ? "否" : "是";
        }
        return applyCardStatus;
    }

    public void setApplyCardStatus(String applyCardStatus) {
        this.applyCardStatus = applyCardStatus;
    }

    public String getUnextendedReason() {
        if (unextendedReason != null) {
            List<String> reasonList = Arrays.asList(unextendedReason.split("\\|"));
            List<String> newReasonList = new ArrayList<>();
            if (!reasonList.isEmpty()) {
                for (int index = 0; index < reasonList.size(); index++) {
                    if ("0x—0Aa".equals(reasonList.get(index))) {
                        newReasonList.add("前期未走访");
                    }
                    if ("0y-1Aa".equals(reasonList.get(index))) {
                        newReasonList.add("站长无合作意向");
                    }
                    if ("0-Aa".equals(reasonList.get(index))) {
                        newReasonList.add("网点已全部为移动用户");
                    }
                    if ("1-Bb".equals(reasonList.get(index))) {
                        newReasonList.add("友商已统谈不好拓展");
                    }
                    if ("2-Cc".equals(reasonList.get(index))) {
                        newReasonList.add("对我方资费不认可");
                    }
                    if ("3-Dd".equals(reasonList.get(index))) {
                        newReasonList.add("对我方网格不认可");
                    }
                    if ("4-Ee".equals(reasonList.get(index))) {
                        newReasonList.add("其他(" + reasonList.get(index + 1) + ")");
                    }
                }
                return String.join("|", newReasonList);
            }
        }

        return "";
    }

    public String getTsitska() {
        if (tsitska != null) {
            return "0".equals(tsitska) ? "否" : "是";
        }
        return tsitska;
    }

    public void setTsitska(String tsitska) {
        this.tsitska = tsitska;
    }
}